package com.huilian.iotbox.data.service;

import com.huilian.iotbox.data.dto.OrderDto;
import com.huilian.iotbox.data.po.JsPay;
import com.huilian.iotbox.data.po.Order;
import com.huilian.iotbox.data.vo.OrderItemVo;
import com.huilian.iotbox.data.vo.OrderVo;

import java.math.BigDecimal;
import java.util.List;

public interface OrderCommonService {
    Long insert(
            Integer userId,
            Integer merchantStoreId,
            String deviceNo,
            Integer deviceTypeId,
            String body,
            BigDecimal money,
            int coin,
            int presentedCoin,
            Integer optionType,
            Integer mchType,
            String channelType,
            String payChannelOrderNo,
            Integer typeOfArrival,
            Integer terminalType
    );

    /**
     * 根据第三方订单号和收款商户类型
     */
    OrderVo findOrderByPayChannelOrderNo(OrderDto orderDto);

    /**
     * 根据第三方订单号和收款商户类型和抖音订单certificate_id
     */
    OrderVo findOrderByPayChannelOrderNoAndDYId(OrderDto orderDto);

    /**
     * 增加order
     */
    Integer addOrder(Order order);

    /**
     * 修改订单状态
     */
    Integer updateStatusById(Order order);

    void updateOrderTotalAmount(Order updateOrder);

    Integer updateHandlingCharge(Long orderId,BigDecimal handlingCharge);
    OrderVo findByOperationUserId(OrderDto orderDto) throws Exception;

}
